package com.song.mapper;

import com.song.pojo.Student;
import com.song.pojo.StudentQueryParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper {
    //查询学生列表
    List<Student> getStudents(StudentQueryParam param);

    //添加学生信息
    Integer addStudent(Student student);

    Integer deleteStudentByIds(List<Integer> ids);
    @Select("select * from student where id=#{id}")
    Student getStudentById(Integer id);

    Integer updateStudent(Student student);

    Integer handleStudentViolation(Integer id, Short score);
    @MapKey("name")
    List<Map<String, Object>> getStudentsDegreeDetail();
    @MapKey("班级名称")
    List<Map<String,Object>> getStudentsCountDetail();
}
